<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    class Point{
        constructor(age, name){
            this.age = age;
            this.name = name;
        } 
        toString(){
            return `Point:[Age = ${ this.age }  , Y =  ${ this.name }  ] `
        }  
        // fun1(){
        //     console.log("1");
        // }
        fun1(x, y ){
            console.log(this );
            console.log(2);
        }
    }
    Point.</script>prototype.gender = "男"



    let p1 =  new Point(1,"aaa")

   

    let p2 =  new Point(2,"aaa")
    console.log(p2);

    console.log(p2.gender);


    // let p =new Point(18, "ttc");
    // p.fun1()

    // 可以为任何对象增加任何属性；
    // p.pid= "123456"
    // console.log(p );
    // console.log(p.toString());

</script>